<?php

use yii\db\Migration;

/**
 * Class m190512_024203_user_package_add_use_pool
 */
class m190512_024203_user_package_add_use_pool extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->addColumn('{{%user_package}}', 'use_pool', $this->integer()->notNull()->defaultValue(0)->after('package_id')->comment('是否使用流量池'));
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        $this->dropColumn('{{%user_package}}', 'use_pool');
    }
}
